﻿<%@ Page Title="" Language="C#" MasterPageFile="~/AdminCP/Layouts/Admin.Master" AutoEventWireup="true"
    CodeBehind="CreatedBill.aspx.cs" Inherits="MLM.AdminCP.Pages.CreatedBill" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    Created Bill
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <telerik:RadGrid ID="BillGrid" runat="server" AllowFilteringByColumn="True"
        DataSourceID="BillEds" AllowPaging="True" AllowSorting="True" GridLines="None"
        ShowGroupPanel="True"  AllowAutomaticInserts="True" AllowAutomaticUpdates="True"
        AllowAutomaticDeletes="True" ShowFooter="True" ShowStatusBar="True" meta:resourcekey="BillGridResource1">
        <ClientSettings AllowColumnsReorder="True" AllowDragToGroup="True">
            <Selecting AllowRowSelect="True" />
            <Scrolling AllowScroll="True" UseStaticHeaders="True" />
            <Selecting AllowRowSelect="True"></Selecting>
            <Scrolling AllowScroll="True" UseStaticHeaders="True"></Scrolling>
        </ClientSettings>
        <MasterTableView AutoGenerateColumns="False" DataKeyNames="InvoiceID" DataSourceID="BillEds"
            ShowHeadersWhenNoRecords="true">
            <CommandItemSettings ShowAddNewRecordButton="true" ShowRefreshButton="true"></CommandItemSettings>
            <RowIndicatorColumn>
                <HeaderStyle Width="20px"></HeaderStyle>
            </RowIndicatorColumn>
            <ExpandCollapseColumn>
                <HeaderStyle Width="20px"></HeaderStyle>
            </ExpandCollapseColumn>
            <Columns>
                <telerik:GridBoundColumn DataField="InvoiceID" HeaderText="ID" ReadOnly="True" SortExpression="InvoiceID"
                    UniqueName="InvoiceID" meta:resourcekey="GridBoundColumnResource1">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="UserID" HeaderText="User ID" ReadOnly="True"
                    SortExpression="UserID" UniqueName="UserID" meta:resourcekey="GridBoundColumnResource2">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="DepoID" HeaderText="Order to" ReadOnly="True"
                    SortExpression="DepoID" UniqueName="DepoID" meta:resourcekey="GridBoundColumnResource3">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="DateTimeCreated" HeaderText="DateTime Created"
                    ReadOnly="True" SortExpression="DateTimeCreated" UniqueName="DateTimeCreated"
                    meta:resourcekey="GridBoundColumnResource4">
                </telerik:GridBoundColumn>             
                <telerik:GridTemplateColumn runat="server" ShowFilterIcon="false" AllowFiltering="false"
                    meta:resourcekey="GridTemplateColumnResource2">
                    <ItemStyle CssClass="MyImageButton"></ItemStyle>
                    <ItemTemplate>
                        <a href='/AdminCP/Pages/BillExportManual.aspx?ID=<%# Eval("InvoiceID") %>'>Export</a>                            
                        </a>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
            </Columns>
        </MasterTableView>
        <HeaderContextMenu EnableImageSprites="True" CssClass="GridContextMenu GridContextMenu_Office2007">
        </HeaderContextMenu>
    </telerik:RadGrid>
    <asp:EntityDataSource ID="BillEds" runat="server" ConnectionString="name=MLMDataContext"
        DefaultContainerName="MLMDataContext" EnableDelete="True" EnableUpdate="True"
        EntitySetName="Invoices" EntityTypeFilter="" Select="" OrderBy="it.InvoiceID desc" AutoGenerateWhereClause="true">
        <WhereParameters>
           <asp:CookieParameter runat="server" Name="CreatedBy" CookieName="CurrentUserId" Type="Int64" />
           <asp:Parameter runat="server" DefaultValue="true" Type="Boolean" Name="IsManual"/>           
        </WhereParameters>
    </asp:EntityDataSource>
</asp:Content>
